package com.situ.mall.service.Impl;

import com.situ.mall.mapper.DrawMapper;
import com.situ.mall.pojo.entity.Draw;
import com.situ.mall.service.IDrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DrawServiceImpl implements IDrawService {
    @Autowired
    private DrawMapper drawMapper;

    @Override
    public void addNumber(Integer userId) {
        drawMapper.addNumber(userId);
    }

    @Override
    public Draw drawNumber(Integer userId) {
        return drawMapper.drawNumber(userId);
    }

    @Override
    public void reduceDrawNumber(Integer userId) {
        drawMapper.reduceDrawNumber(userId);
    }

    @Override
    public Draw selectByUserId(Integer userId) {
        return drawMapper.selectByUserId(userId);
    }

    @Override
    public void addDraw(Draw newDraw) {
        drawMapper.insertSelective(newDraw);
    }
}
